package com.cplatform.movie.back.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("appConfig")
public class AppConfig {

	/** token cookie 的名称 */
	public static final String COOKIE_TOKEN = "mplusid";

	/** 登录 session 的名称 */
	public static final String SESS_LOGIN_USER = "_dest_login_";

	/** 账号锁定状态 */
	public static final String INFO_LOCKED = "locked";

	/** 邮箱需要验证 */
	public static final String INFO_NEED_VALIDATE = "need-validate";

	/** 邮箱已经验证过了 */
	public static final String INFO_ALREADY_VALIDATE = "already-validate";

	/** 验证失败，code和数据库不相符 */
	public static final String INFO_VALIDATE_FAIL = "validate-fail";

	/** 错误的email，在数据库中找不到 */
	public static final String INFO_WRONG_EMAIL = "wrong-email";

	/** 邮箱验证成功 */
	public static final String INFO_VALIDATE_SUCCESS = "validate-success";

	/** 创建账号成功，验证邮件已发送 */
	public static final String INFO_VALIDATE_SEND = "validate-send";

	
//	@Value("${sso.server:}")
//	private String ssoServer;
//
//	@Value("${sso.client:}")
//	private String ssoClient;

	@Value("${test.facklogin}")
	private boolean fackLogin;
	
	@Value("${res.url:}")
	private String resUrl;
	
	@Value("${res.root:}")
	private String resRoot;

	@Value("${res.web.root:}")
	private String resWebRoot;

	@Value("${xheditor.upload.ext:}")
	private String xheditorExt;
	
	@Value("${xheditor.upload.ext:}")
	private String[] xheditorExts;

	@Value("${xheditor.upload.img.ext:}")
	private String xheditorImageExt;
	
	@Value("${xheditor.upload.img.ext:}")
	private String[] xheditorImageExts;

	@Value("${xheditor.upload.maxsize:}")
	private long xheditorMaxSize;

	@Value("${xheditor.upload.dir:}")
	private String xheditorUploadDir;

	@Value("${xheditor.upload.path:}")
	private String xheditorUploadPath;

	@Value("${xheditor.domain:}")
	private String xheditorDomain;

	@Value("${upload.tmp.dir:}")
	private String uploadTmpDir;

	@Value("${upload.tmp.path:}")
	private String uploadTmpPath;

	@Value("${upload.maxsize:}")
	private long uploadMaxsize;

	/** 找回密码  邮件有效时间*/
	@Value("${RETAKE_PWD_CODE_EFFECTIVE_TIME:}")
	private String retakePwdCodeEffectiveTime;

//	public String getSsoServer() {
//		return ssoServer;
//	}
//
//	public void setSsoServer(String ssoServer) {
//		this.ssoServer = ssoServer;
//	}
//
//	public String getSsoClient() {
//		return ssoClient;
//	}
//
//	public void setSsoClient(String ssoClient) {
//		this.ssoClient = ssoClient;
//	}

	public boolean isFackLogin() {
		return fackLogin;
	}

	public void setFackLogin(boolean fackLogin) {
		this.fackLogin = fackLogin;
	}

	public String getResUrl() {
		return resUrl;
	}

	public void setResUrl(String resUrl) {
		this.resUrl = resUrl;
	}

	public String getResRoot() {
		return resRoot;
	}

	public void setResRoot(String resRoot) {
		this.resRoot = resRoot;
	}

	public String getResWebRoot() {
		return resWebRoot;
	}

	public void setResWebRoot(String resWebRoot) {
		this.resWebRoot = resWebRoot;
	}

	public String[] getXheditorExts() {
		return xheditorExts;
	}

	public void setXheditorExts(String[] xheditorExts) {
		this.xheditorExts = xheditorExts;
	}

	public String getXheditorImageExt() {
		return xheditorImageExt;
	}

	public void setXheditorImageExt(String xheditorImageExt) {
		this.xheditorImageExt = xheditorImageExt;
	}

	public long getXheditorMaxSize() {
		return xheditorMaxSize;
	}

	public void setXheditorMaxSize(long xheditorMaxSize) {
		this.xheditorMaxSize = xheditorMaxSize;
	}

	public String getXheditorUploadDir() {
		return xheditorUploadDir;
	}

	public void setXheditorUploadDir(String xheditorUploadDir) {
		this.xheditorUploadDir = xheditorUploadDir;
	}

	public String getXheditorUploadPath() {
		return xheditorUploadPath;
	}

	public void setXheditorUploadPath(String xheditorUploadPath) {
		this.xheditorUploadPath = xheditorUploadPath;
	}

	public String getXheditorDomain() {
		return xheditorDomain;
	}

	public void setXheditorDomain(String xheditorDomain) {
		this.xheditorDomain = xheditorDomain;
	}

	public String getUploadTmpDir() {
		return uploadTmpDir;
	}

	public void setUploadTmpDir(String uploadTmpDir) {
		this.uploadTmpDir = uploadTmpDir;
	}

	public String getUploadTmpPath() {
		return uploadTmpPath;
	}

	public void setUploadTmpPath(String uploadTmpPath) {
		this.uploadTmpPath = uploadTmpPath;
	}

	public long getUploadMaxsize() {
		return uploadMaxsize;
	}

	public void setUploadMaxsize(long uploadMaxsize) {
		this.uploadMaxsize = uploadMaxsize;
	}

	public String getRetakePwdCodeEffectiveTime() {
		return retakePwdCodeEffectiveTime;
	}

	public void setRetakePwdCodeEffectiveTime(String retakePwdCodeEffectiveTime) {
		this.retakePwdCodeEffectiveTime = retakePwdCodeEffectiveTime;
	}

	public String[] getXheditorImageExts() {
		return xheditorImageExts;
	}

	public void setXheditorImageExts(String[] xheditorImageExts) {
		this.xheditorImageExts = xheditorImageExts;
	}

	public String getXheditorExt() {
		return xheditorExt;
	}

	public void setXheditorExt(String xheditorExt) {
		this.xheditorExt = xheditorExt;
	}
	
	// -- 商品封面图
	@Value("${upload.item.cover.dir:}")
	private String uploadItemCoverDir;
	@Value("${upload.item.cover.path:}")
	private String uploadItemCoverPath;
	
	// -- 商品详情图
	@Value("${upload.item.info.dir:}")
	private String uploadItemInfoDir;
	@Value("${upload.item.info.path:}")
	private String uploadItemInfoPath;

	public String getUploadItemCoverDir() {
		return uploadItemCoverDir;
	}

	public void setUploadItemCoverDir(String uploadItemCoverDir) {
		this.uploadItemCoverDir = uploadItemCoverDir;
	}

	public String getUploadItemCoverPath() {
		return uploadItemCoverPath;
	}

	public void setUploadItemCoverPath(String uploadItemCoverPath) {
		this.uploadItemCoverPath = uploadItemCoverPath;
	}

	public String getUploadItemInfoDir() {
		return uploadItemInfoDir;
	}

	public void setUploadItemInfoDir(String uploadItemInfoDir) {
		this.uploadItemInfoDir = uploadItemInfoDir;
	}

	public String getUploadItemInfoPath() {
		return uploadItemInfoPath;
	}

	public void setUploadItemInfoPath(String uploadItemInfoPath) {
		this.uploadItemInfoPath = uploadItemInfoPath;
	}
	
	/** 商品分类图片**/
	@Value("${upload.item.type.dir:}")
	private String uploadItemTypeDir;
	@Value("${upload.item.type.path:}")
	private String uploadItemTypePath;

	/** 商户图片**/
	@Value("${upload.store.info.dir:}")
	private String uploadStoreInfoDir;
	@Value("${upload.store.info.path:}")
	private String uploadStoreInfoPath;

	public String getUploadItemTypeDir() {
		return uploadItemTypeDir;
	}

	public void setUploadItemTypeDir(String uploadItemTypeDir) {
		this.uploadItemTypeDir = uploadItemTypeDir;
	}

	public String getUploadItemTypePath() {
		return uploadItemTypePath;
	}

	public void setUploadItemTypePath(String uploadItemTypePath) {
		this.uploadItemTypePath = uploadItemTypePath;
	}

	public String getUploadStoreInfoDir() {
		return uploadStoreInfoDir;
	}

	public void setUploadStoreInfoDir(String uploadStoreInfoDir) {
		this.uploadStoreInfoDir = uploadStoreInfoDir;
	}

	public String getUploadStoreInfoPath() {
		return uploadStoreInfoPath;
	}

	public void setUploadStoreInfoPath(String uploadStoreInfoPath) {
		this.uploadStoreInfoPath = uploadStoreInfoPath;
	}
	
	/** 活动图片**/
	@Value("${upload.activities.info.dir:}")
	private String uploadActivitiesInfoDir;
	/** 活动图片**/
	@Value("${upload.activities.info.path:}")
	private String uploadActivitiesInfoPath;

	public String getUploadActivitiesInfoDir() {
		return uploadActivitiesInfoDir;
	}

	public void setUploadActivitiesInfoDir(String uploadActivitiesInfoDir) {
		this.uploadActivitiesInfoDir = uploadActivitiesInfoDir;
	}

	public String getUploadActivitiesInfoPath() {
		return uploadActivitiesInfoPath;
	}

	public void setUploadActivitiesInfoPath(String uploadActivitiesInfoPath) {
		this.uploadActivitiesInfoPath = uploadActivitiesInfoPath;
	}
	
	
	
}
